{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "# Build your own Haiku"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "In this Colab, we will build a highly-simplified version of Haiku from scratch, to give you some insight into how Haiku works.\n",
        "\n",
        "This is an \"advanced\" tutorial for folks seeking a deeper understanding of Haiku's internals. It's not required to understand how to use Haiku in practice. (\"advanced\" is in quotes because it's not actually all that complicated, so don't be afraid!)\n",
        "\n",
        "The implementation here is based on the design of the real Haiku library, but with most details simplified. Therefore, while this should give you a reasonably accurate sense of what's going on under-the-hood conceptually, don't rely on the details to match.\n",
        "\n",
        "## The Problem\n",
        "\n",
        "We want to be able to write object-oriented classes with parameter attributes, like this,"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "class MyModule:\n",
        "\n",
        "  def apply(self, x):\n",
        "    return self.w * x"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "and automatically transform them into pure functions, like this:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "def my_stateless_apply(params, x):\n",
        "  return params['w'] * x"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "\n",
        "(However, instead of using attribute access via `self.*`, we define our own accessor function called `get_param()`. It makes it much easier to intercept its usage, which we need to collect and inject parameter values later.)\n",
        "\n",
        "Additionally, it would be nice if this transformation also defined parameter initialisation, and automatically handled assigning parameters unique names, as managing that manually in large networks can get unwieldy. E.g., if some other module also called its parameter `w`, we'd like to automatically resolve such conflicts.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "We will tackle this problem in steps.\n",
        "\n",
        "* At the first step, we will implement a basic `transform` that converts object-oriented-style functions into pure ones.\n",
        "* The next step will be to add the initialisation.\n",
        "* Finally, we will handle the plumbing involved when several copies of the same module are used, or different modules use the same name for their parameters.\n",
        "\n",
        "At that stage, we will already be able to define and train a simple neural network just like with the real Haiku."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "## The Basic Strategy\n",
        "\n",
        "We will define a function that implements the transformation from the stateful style that uses `get_param` to a stateless function. This function will be aptly called `transform`. It will wrap a `MyModule().apply` into a function that works just like `my_stateless_apply`.\n",
        "\n",
        "Here's how it will work. `transform(f)` will return a wrapped version of `f` that accepts an extra `params` argument. When called, it will run `f`, and every time `f` will call `get_param`, it will extract the corresponding value from `params` and return it."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "# Global state which holds the parameters for the transformed function.\n",
        "# get_param uses this to know where to get params from.\n",
        "current_params = []\n",
        "\n",
        "def transform(f):\n",
        "\n",
        "  def apply_f(params, *args, **kwargs):\n",
        "    current_params.append(params)\n",
        "    outs = f(*args, **kwargs)\n",
        "    current_params.pop()\n",
        "    return outs\n",
        "\n",
        "  return apply_f\n",
        "\n",
        "\n",
        "def get_param(identifier):\n",
        "  return current_params[-1][identifier]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "let's test it:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "25"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "params = dict(w=5)\n",
        "my_stateless_apply(params, 5)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "25"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "class MyModule:\n",
        "  def apply(self, x):\n",
        "    return get_param('w') * x\n",
        "\n",
        "transform(MyModule().apply)(params, 5)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "\"Hold on!\" you say. Isn't JAX all about not having global state? This won't possibly work in JAX! Well, let's try it with JAX:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 6,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)\n"
          ]
        },
        {
          "data": {
            "text/plain": [
              "DeviceArray([[4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.],\n",
              "             [4., 4., 4., 4., 4.]], dtype=float32)"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "import jax\n",
        "import jax.numpy as jnp\n",
        "\n",
        "def linear(x):\n",
        "  return x @ get_param('w') + get_param('b')\n",
        "\n",
        "params = dict(w=jnp.ones((3, 5)), b=jnp.ones((5,)))\n",
        "apply = transform(linear)\n",
        "\n",
        "jax.jit(apply)(params, jnp.ones((10, 3)))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "The reason this works is that while we use global state, we're careful about how we use it. We leave the global state after a function call the same as before it, and we ensure that the outputs of a wrapped function depend only on its inputs. Thus, JAX is none the wiser -- for all it cares, the transformed function is pure."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "## Adding initialization\n",
        "\n",
        "So far, so good, but we aren't able to reuse modules, because our transform will share parameters between all copies of the same module, because they will all be named the same. Also, defining the initial state is a pain -- can we automate that?\n",
        "\n",
        "Let's tackle initialisation first. For simplicity, our parameters will always initialise using the normal distribution, but it's not hard to add the option of different initialisers.\n",
        "\n",
        "In this new version, we `transform` one object-oriented stateful function into two pure functions: one which initialises params, and one which applies them. These correspond to running the original function in two modes: initialisation and application. \n",
        "\n",
        "To support this, we add extra machinery (the `Frame`) to track which mode we're in, and change the behaviour of `get_param()`:\n",
        "\n",
        "* We add a `shape` argument, which tells us what shape the param should be if initialising.\n",
        "* If initialising, `get_param()` will create the param of the correct shape and add it to the current params in the `Frame` before returning.\n",
        "\n",
        "Thus, `get_param()` generates the initial values just in time for them to get used in a call of the stateful function."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "from typing import NamedTuple, Dict, Callable\n",
        "import numpy as np"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "# Since we're tracking more than just the current params,\n",
        "# we introduce the concept of a frame as the object that holds\n",
        "# state during a transformed execution.\n",
        "frame_stack = []\n",
        "\n",
        "class Frame(NamedTuple):\n",
        "  \"\"\"Tracks what's going on during a call of a transformed function.\"\"\"\n",
        "  params: Dict[str, jax.Array]\n",
        "  is_initialising: bool = False\n",
        "\n",
        "def current_frame():\n",
        "  return frame_stack[-1]\n",
        "\n",
        "\n",
        "class Transformed(NamedTuple):\n",
        "  init: Callable\n",
        "  apply: Callable\n",
        "\n",
        "\n",
        "def transform(f) -> Transformed:\n",
        "\n",
        "  def init_f(*args, **kwargs):\n",
        "    frame_stack.append(Frame({}, is_initialising=True))\n",
        "    f(*args, **kwargs)\n",
        "    frame = frame_stack.pop()\n",
        "    return frame.params\n",
        "\n",
        "  def apply_f(params, *args, **kwargs):\n",
        "    frame_stack.append(Frame(params))\n",
        "    outs = f(*args, **kwargs)\n",
        "    frame_stack.pop()\n",
        "    return outs\n",
        "\n",
        "  return Transformed(init_f, apply_f)\n",
        "\n",
        "def get_param(identifier, shape):\n",
        "  if current_frame().is_initialising:\n",
        "    current_frame().params[identifier] = np.random.normal(size=shape)\n",
        "\n",
        "  return current_frame().params[identifier]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "Let's test it by implementing a Linear module:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "{'b': (4,), 'w': (3, 4)}"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Make printing parameters a little more readable\n",
        "def parameter_shapes(params):\n",
        "  return jax.tree.map(lambda p: p.shape, params)\n",
        "\n",
        "\n",
        "class Linear:\n",
        "\n",
        "  def __init__(self, width):\n",
        "    self._width = width\n",
        "\n",
        "  def __call__(self, x):\n",
        "    w = get_param('w', shape=(x.shape[-1], self._width))\n",
        "    b = get_param('b', shape=(self._width,))\n",
        "    return x @ w + b\n",
        "\n",
        "init, apply = transform(Linear(4))\n",
        "\n",
        "data = jnp.ones((2, 3))\n",
        "\n",
        "params = init(data)\n",
        "parameter_shapes(params)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "DeviceArray([[-1.0345883,  0.3280404, -2.4382973,  0.5717376],\n",
              "             [-1.0345883,  0.3280404, -2.4382973,  0.5717376]],            dtype=float32)"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "apply(params, data)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "## Adding unique parameter names: our finished mini-Haiku\n",
        "\n",
        "Alright! Time to tackle nesting modules, and our prototype will be done.\n",
        "\n",
        "For this, we need to give each parameter an unambiguous name. Here, we will use a scheme that's somewhat different and incompatible with the real Haiku, but which is simpler. The idea is to record the names of the functions being called, and to assign each parameter a unique identifier based on its location in the call stack.\n",
        "\n",
        "For this, we will define a Module class. Each module will have a unique identifier based on the class name and the number of instances of the module created so far. (Real Haiku allows to customise these names, but we ignore that for simplicity)\n",
        "\n",
        "We will also define a decorator for Module methods, called `module_method`, which will tell us when the wrapped function is called, allowing us to track the current parameter scope. Real haiku uses metaclasses to automatically wrap all methods on a `Module`, but for simplicity we do this manually."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 11,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "import dataclasses\n",
        "import collections\n",
        "\n",
        "@dataclasses.dataclass\n",
        "class Frame:\n",
        "  \"\"\"Tracks what's going on during a call of a transformed function.\"\"\"\n",
        "  params: Dict[str, jax.Array]\n",
        "  is_initialising: bool = False\n",
        "\n",
        "  # Keeps track of how many modules of each class have been created so far.\n",
        "  # Used to assign new modules unique names.\n",
        "  module_counts: Dict[str, int] = dataclasses.field(\n",
        "      default_factory=lambda: collections.defaultdict(lambda: 0))\n",
        "\n",
        "  # Keeps track of the entire path to the current module method call.\n",
        "  # Module methods, when called, will add themselves to this stack.\n",
        "  # Used to give each parameter a unique name corresponding to the\n",
        "  # method scope it is in.\n",
        "  call_stack: list = dataclasses.field(default_factory=list)\n",
        "\n",
        "  def create_param_path(self, identifier) -> str:\n",
        "    \"\"\"Creates a unique path for this param.\"\"\"\n",
        "    return '/'.join(['~'] + self.call_stack + [identifier])\n",
        "\n",
        "  def create_unique_module_name(self, module_name: str) -> str:\n",
        "    \"\"\"Assigns a unique name to the module by appending its number to its name.\"\"\"\n",
        "    number = self.module_counts[module_name]\n",
        "    self.module_counts[module_name] += 1\n",
        "    return f\"{module_name}_{number}\"\n",
        "  \n",
        "frame_stack = []\n",
        "\n",
        "def current_frame():\n",
        "  return frame_stack[-1]\n",
        "\n",
        "\n",
        "class Module:\n",
        "  def __init__(self):\n",
        "    # Assign a unique (for the current `transform` call)\n",
        "    # name to this instance of the module.\n",
        "    self._unique_name = current_frame().create_unique_module_name(\n",
        "        self.__class__.__name__)\n",
        "\n",
        "\n",
        "def module_method(f):\n",
        "  \"\"\"A decorator for Module methods.\"\"\"\n",
        "  # In the real Haiku, this doesn't face the user but is applied by a metaclass.\n",
        "\n",
        "  def wrapped(self, *args, **kwargs):\n",
        "    \"\"\"A version of f that lets the frame know it's being called.\"\"\"\n",
        "    # Self is the instance to which this method is attached.\n",
        "    module_name = self._unique_name\n",
        "    call_stack = current_frame().call_stack\n",
        "    call_stack.append(module_name)\n",
        "    call_stack.append(f.__name__)\n",
        "    outs = f(self, *args, **kwargs)\n",
        "    assert call_stack.pop() == f.__name__\n",
        "    assert call_stack.pop() == module_name\n",
        "    return outs\n",
        "\n",
        "  return wrapped\n",
        "\n",
        "\n",
        "def get_param(identifier, shape):\n",
        "  frame = current_frame()\n",
        "  param_path = frame.create_param_path(identifier)\n",
        "\n",
        "  if frame.is_initialising:\n",
        "    frame.params[param_path] = np.random.normal(size=shape)\n",
        "\n",
        "  return frame.params[param_path]\n",
        "\n",
        "\n",
        "class Linear(Module):\n",
        "\n",
        "  def __init__(self, width):\n",
        "    super().__init__()\n",
        "    self._width = width\n",
        "\n",
        "  @module_method  # Again, this decorator is behind-the-scenes in real Haiku.\n",
        "  def __call__(self, x):\n",
        "    w = get_param('w', shape=(x.shape[-1], self._width))\n",
        "    b = get_param('b', shape=(self._width,))\n",
        "    return x @ w + b"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "At this stage, we have replicated some core Haiku functionality, but we still don't have:\n",
        "* control over initialisation\n",
        "* rng handling\n",
        "* state handling (though conceptually that's analogous to parameter handling)\n",
        "* any kind of validation and error handling\n",
        "* freezing parameters once they're created\n",
        "* thread-safety\n",
        "* JAX transformations inside a transform (e.g. hk.remat)\n",
        "* JAX control flow inside transforms (e.g. hk.scan)\n",
        "* last but not least, documentation :)\n",
        "\n",
        "and lots more. However, the basics work, so we can take our mini-Haiku for a ride:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 12,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "{'~/Linear_0/__call__/b': (4,), '~/Linear_0/__call__/w': (3, 4)}"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "init, apply = transform(lambda x: Linear(4)(x))\n",
        "\n",
        "params = init(data)\n",
        "parameter_shapes(params)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 13,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "DeviceArray([[-1.1969297,  1.3215988,  5.175427 , -1.9018829],\n",
              "             [-1.1969297,  1.3215988,  5.175427 , -1.9018829]],            dtype=float32)"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "apply(params, data)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "Different Modules in a function call all have separate parameters:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 14,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "class MLP(Module):\n",
        "\n",
        "  def __init__(self, widths):\n",
        "    super().__init__()\n",
        "    self._widths = widths\n",
        "\n",
        "  @module_method\n",
        "  def __call__(self, x):\n",
        "    for w in self._widths:\n",
        "      out = Linear(w)(x)\n",
        "      x = jax.nn.sigmoid(out)\n",
        "    return out"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 15,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "{'~/MLP_0/__call__/Linear_0/__call__/b': (3,),\n",
              " '~/MLP_0/__call__/Linear_0/__call__/w': (3, 3),\n",
              " '~/MLP_0/__call__/Linear_1/__call__/b': (5,),\n",
              " '~/MLP_0/__call__/Linear_1/__call__/w': (3, 5)}"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "init, apply = transform(lambda x: MLP([3, 5])(x))\n",
        "parameter_shapes(init(data))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "While the same module called in different places reuses parameters:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 16,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "{'~/ParameterReuseTest_0/__call__/Linear_0/__call__/b': (3,),\n",
              " '~/ParameterReuseTest_0/__call__/Linear_0/__call__/w': (3, 3)}"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "class ParameterReuseTest(Module):\n",
        "\n",
        "  @module_method\n",
        "  def __call__(self, x):\n",
        "    f = Linear(x.shape[-1])\n",
        "\n",
        "    x = f(x)\n",
        "    x = jax.nn.relu(x)\n",
        "    return f(x)\n",
        "\n",
        "init, forward = transform(lambda x: ParameterReuseTest()(x))\n",
        "parameter_shapes(init(data))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_"
      },
      "source": [
        "## Example training loop\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 17,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "import matplotlib.pyplot as plt"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 18,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "{'~/MLP_0/__call__/Linear_0/__call__/b': (128,),\n",
              " '~/MLP_0/__call__/Linear_0/__call__/w': (1, 128),\n",
              " '~/MLP_0/__call__/Linear_1/__call__/b': (128,),\n",
              " '~/MLP_0/__call__/Linear_1/__call__/w': (128, 128),\n",
              " '~/MLP_0/__call__/Linear_2/__call__/b': (1,),\n",
              " '~/MLP_0/__call__/Linear_2/__call__/w': (128, 1)}"
            ]
          },
          "execution_count": 1,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Data: a quadratic curve.\n",
        "xs = np.linspace(-2., 2., num=128)[:, None]  # Generate array of shape (128, 1).\n",
        "ys = xs ** 2\n",
        "\n",
        "# Model\n",
        "def mlp(x):\n",
        "  return MLP([128, 128, 1])(x)\n",
        "\n",
        "init, forward = transform(mlp)\n",
        "params = init(xs)\n",
        "parameter_shapes(params)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 19,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "# Loss function and update function\n",
        "def loss_fn(params, x, y):\n",
        "  return jnp.mean((forward(params, x) - y) ** 2)\n",
        "\n",
        "LEARNING_RATE = 0.003\n",
        "\n",
        "@jax.jit\n",
        "def update(params, x, y):\n",
        "  grads = jax.grad(loss_fn)(params, x, y)\n",
        "  return jax.tree.map(\n",
        "      lambda p, g: p - LEARNING_RATE * g, params, grads\n",
        "  )"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 20,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": [
        "for _ in range(5000):\n",
        "  params = update(params, xs, ys)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 21,
      "metadata": {
        "id": "_"
      },
      "outputs": [
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAwUklEQVR4nO3de3TU5bXw8e+eXEwQJQpBIMHiWXbRCoZbpLbi5UDx2gJ6LGpr1bYc5PXW9m2huOqLSF2C0iPWW4XSnkNrq+QgYnphefBCNZ7WkghE0NJSFz0kSAlgQA7BXGa/f8zvFyeT39ySuc/+rJXF5DcPM08myc4zez8XUVWMMcZkP1+6O2CMMSYxLKAbY0yOsIBujDE5wgK6McbkCAvoxhiTIwrT9cRDhgzRUaNGpevpj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ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "plt.scatter(xs, ys, label='Data')\n",
        "plt.scatter(xs, forward(params, xs), label='Model prediction')\n",
        "plt.legend()\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "_"
      },
      "outputs": [],
      "source": []
    }
  ],
  "metadata": {
    "colab": {}
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
